package net.llz.strategy;

public class DiscountActivity extends Strategy{
    /**
     * 具体的折扣
     */
    private double rate;

    public DiscountActivity(double rate){
        this.rate = rate;
    }

    @Override
    public double computePrice(ProductOrder productOrder) {
        //一系列复杂的计算

        return  productOrder.getOldPrice() * rate;

    }
}
